/*
 * @Author: CQJ
 * @Date: 2022-08-28 23:33:11
 * @LastEditors: CQJ
 * @LastEditTime: 2022-09-06 11:24:05
 * @Description:
 */

import type { AtlasListData } from '@/types/site/atlas/atlasList'

export const PICTURE_PRICE_TYPE: Record<number, any> = {
  1: '免费',
  2: '付费',
  3: '点播'
}

export const column = [
  {
    title: '图集ID',
    dataIndex: 'picture_id',
    key: 'picture_id',
    width: 190
  },
  {
    title: '图集封面',
    dataIndex: 'picture_cover',
    key: 'picture_cover',
    width: 100
  },
  {
    title: '图集名称',
    dataIndex: 'picture_name',
    key: 'picture_name',
    width: 100
  },
  {
    title: '分类/子类',
    key: 'picture_categ_name',
    dataIndex: 'picture_categ_name',
    width: 120
  },
  {
    title: '所属专辑',
    key: 'picture_album',
    dataIndex: 'picture_album',
    width: 100
  },
  {
    title: '收费状态',
    key: 'picture_price_type',
    dataIndex: 'picture_price_type',
    width: 140
  },
  {
    title: '章节数量',
    key: 'picture_chapter_count',
    dataIndex: 'picture_chapter_count',
    width: 100
  },
  {
    title: '图片数量',
    key: 'picture_count',
    dataIndex: 'picture_count',
    width: 100
  },
  {
    title: '人气',
    key: 'picture_popularity',
    dataIndex: 'picture_popularity',
    sorter: (a: AtlasListData, b: AtlasListData) => Number(a.picture_popularity) - Number(b.picture_popularity),
    showSorterTooltip: false,
    sortDirections: ['descend', 'ascend'],
    width: 120
  },
  {
    title: '更新时间',
    key: 'updated_at',
    dataIndex: 'updated_at',
    width: 190
  },
  {
    title: '状态',
    key: 'picture_status',
    dataIndex: 'picture_status',
    width: 80
  },
  {
    title: '操作',
    key: 'action',
    fixed: 'right',
    width: 120
  }
]
